﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PTUDW_CNTN2010_F_CDT.ViewModel;
using PTUDW_CNTN2010_F_CDT.Filters;

namespace PTUDW_CNTN2010_F_CDT.Controllers
{
    [LanguageFilter]
    public class ListShopController : Controller
    {
        //
        // GET: /ListShop/
        String[] DS = { "YenShop", "BagStore", "CongtyHuyena", "ShopOnline", "ShopTN" };
        List<Shop> lstShop;

        public ActionResult Index()
        {
            return View();
        }

        [ChildActionOnly]
        public ActionResult getListShop()
        {
            List<Shop> list = getData();
            return PartialView(list);
        }
        
        private List<Shop> getData()
        {
            lstShop = new List<Shop>();
            for (int i = 0; i < DS.Count(); i++)
            {
                Shop p = new Shop();
                p.ID = i;
                p.Name = DS[i];
                p.pathIcon = "";
                lstShop.Add(p);
            }
            return lstShop;
        }

    }
}
